{include file="common/header.tpl"}
<section class="main">
	
    <article class="right-col">
    	<h2><a href="{$back}">{$language.title.section}</a> &raquo; {$language.ahref.update}</h2>
        <form name="frmEdit" id="frmEdit" method="post" enctype="multipart/form-data" action="{$smarty.const.HOST_BACKEND}section/saveedit" class="ui">
        	<input type="hidden" name="psectionid" id="psectionid" value="{$row.sectionid}" />
        	<ul>
                {if isset($smarty.session.SECTION_ERROR)}
                    <li class="error">
                        {include file="common/error.tpl" errors=$smarty.session.SECTION_ERROR}
                    </li>
                {/if}
                <li>
                    <label for="pcode">{$language.label.code}:</label>
                    <strong class="hint">{$row.code}</strong>
                </li>
                <li>
                    <label for="pname">{$language.label.name}<span class="required">*</span>:</label>
                    <div class="txt">
                    	<input type="text" class="text" name="pname" id="pname" value="{if isset($smarty.session.SECTION_PARAM.pname)}{$smarty.session.SECTION_PARAM.pname|escape}{else}{$row.name|escape}{/if}" />
                    </div>
                </li>                            
                <li>
                    <label for="pperm_a">{$language.label.role}:</label>
                    <div class="sel">
                        <select name="pperm_a" id="pperm_a">
                        	{if isset($smarty.session.SECTION_PARAM.pperm_a)}
                        		{html_options options=$arrType selected=$smarty.session.SECTION_PARAM.pperm_a}
                            {else}
                            	{html_options options=$arrType selected=$row.perm_a}
                            {/if}
                        </select>
                    </div>
                </li> 
                <li>
                    <label for="pperm_a">{$language.label.enabled}:</label>
                    <div class="sel">
                        <select name="penabled" id="penabled">
                        	{if isset($smarty.session.SECTION_PARAM.penabled)}
                        		{html_options options=$arrEnabled selected=$smarty.session.SECTION_PARAM.penabled}
                            {else}
                            	{html_options options=$arrEnabled selected=$row.enabled}
                            {/if}
                        </select>
                    </div>
                </li>                
                <li>
                	<button type="submit"><strong>{$language.btn.save}</strong></button>
                    <button type="button" class="cancel" onclick="javascript:document.location.href='{$back}';"><strong>{$language.btn.cancel}</strong></button>
                </li>
            </ul>
        </form>
  	</article>
</section>
{include file="common/footer.tpl"}
                
